package com.xyoto.community.controller;

import com.xyoto.community.service.CampusNewsFlashService;
import com.xyoto.community.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author: 廖振辉
 * Date: 2021/11/17
 * Description: 校园快讯controller
 */
@Api(tags = "校园快讯（前台）")
@RestController
@RequestMapping("/capmpusNewsFlash")
public class CampusNewsFlashController {

    @Autowired
    private CampusNewsFlashService campusNewsFlashService;

    /**
     * 获取当前处于正在展示状态的校园快讯
     * @author 廖振辉
     * @return {@link Result}
     */
    @ApiOperation("获取当前处于正在展示状态的校园快讯")
    @GetMapping("/getAll")
    public Result listCampusNewsFlash(){
        return campusNewsFlashService.getAll();
    }

}
